        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>vec2 class / vector_math Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="vector_math" data-type="vec2">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../vector_math.html">vector_math</a> &rsaquo; <a href="../vector_math/vec2.html">vec2</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>vec2</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class vec2 {
 double x;
 double y;
 /// Constructs a new [vec2]. Follows GLSL constructor syntax so many combinations are possible
 vec2([dynamic x_, dynamic y_]) {
   x = y = 0.0;
   if (x_ is vec2) {
     xy = x_.xy;
     return;
   }
   if (x_ is num &amp;&amp; y_ is num) {
     x = x_.toDouble();
     y = y_.toDouble();
     return;
   }
   if (x_ is num) {
     x = y = x_.toDouble();
     return;
   }
 }
 /// Constructs a new [vec2] zero vector.
 vec2.zero() { makeZero(); }
 /// Make [this] the zero vector.
 vec2 makeZero() {
   x = 0.0;
   y = 0.0;
   return this;
 }
 /// Constructs a copy of [other].
 vec2.copy(vec2 other) {
   makeCopy(other);
 }
 /// Make [this] a copy of [other] [other].
 vec2 makeCopy(vec2 other) {
   x = other.x;
   y = other.y;
   return this;
 }
 /// Constructs a new [vec2] that is initialized with passed in values.
 vec2.raw(num x_, num y_) {
   makeRaw(x_, y_);
 }
 /// Components of [this] are set to the passed in values.
 vec2 makeRaw(num x_, num y_) {
   x = x_.toDouble();
   y = y_.toDouble();
   return this;
 }
 /// Constructs a new [vec2] that is initialized with values from [array] starting at [offset].
 vec2.array(List&lt;num&gt; array, [int offset=0]) {
   int i = offset;
   x = array[i].toDouble();
   i++;
   y = array[i].toDouble();
   i++;
 }
 /// Splats a scalar into all lanes of the vector.
 vec2 splat(num arg) {
   double a = arg.toDouble();
   x = a;
   y = a;
   return this;
 }
 /// Returns a printable string
 String toString() =&gt; '$x,$y';
 /// Returns a new vec2 from -this
 vec2 operator-() =&gt; new vec2.raw(-x, -y);
 /// Returns a new vec2 from this - [other]
 vec2 operator-(vec2 other) =&gt; new vec2.raw(x - other.x, y - other.y);
 /// Returns a new vec2 from this + [other]
 vec2 operator+(vec2 other) =&gt; new vec2.raw(x + other.x, y + other.y);
 /// Returns a new vec2 divided by [other]
 vec2 operator/(dynamic other) {
   if (other is num) {
     var o = 1.0 / other.toDouble();
     return new vec2.raw(x * o, y * o);
   }
   if (other is vec2) {
     return new vec2.raw(x / other.x, y / other.y);
   }
 }
 /// Returns a new vec2 scaled by [other]
 vec2 operator*(dynamic other) {
   if (other is num) {
     var o = other.toDouble();
     return new vec2.raw(x * o, y * o);
   }
   if (other is vec2) {
     return new vec2.raw(x * other.x, y * other.y);
   }
 }
 /// Returns a component from vec2. This is indexed as an array with [i]
 double operator[](int i) {
   assert(i &gt;= 0 &amp;&amp; i &lt; 2);
   switch (i) {
     case 0: return x;
     case 1: return y;
   };
   return 0.0;
 }
 /// Assigns a component in vec2 the value in [v]. This is indexed as an array with [i]
 void operator[]=(int i, double v) {
   assert(i &gt;= 0 &amp;&amp; i &lt; 2);
   switch (i) {
     case 0: x = v; break;
     case 1: y = v; break;
   };
 }
 /// Returns length of this
 double get length {
   double sum = 0.0;
   sum += (x * x);
   sum += (y * y);
   return Math.sqrt(sum);
 }
 /// Returns squared length of this
 double get length2 {
   double sum = 0.0;
   sum += (x * x);
   sum += (y * y);
   return sum;
 }
 /// Normalizes [this]. Returns [this].
 vec2 normalize() {
   double l = length;
   if (l == 0.0) {
     return this;
   }
   x /= l;
   y /= l;
   return this;
 }
 /// Normalizes [this]. Returns length.
 double normalizeLength() {
   double l = length;
   if (l == 0.0) {
     return 0.0;
   }
   x /= l;
   y /= l;
   return l;
 }
 /// Normalizes [this] returns new vector or optional [out]
 vec2 normalized([vec2 out = null]) {
   if (out == null) {
     out = new vec2.raw(x, y);
   }
   double l = out.length;
   if (l == 0.0) {
     return out;
   }
   out.x /= l;
   out.y /= l;
   return out;
 }
 /// Returns the dot product of [this] and [other]
 double dot(vec2 other) {
   double sum = 0.0;
   sum += (x * other.x);
   sum += (y * other.y);
   return sum;
 }
 /// Returns the cross product of [this] and [other], optionally pass in output storage [out]
 double cross(vec2 other) {
   return x * other.y - y * other.x;
 }
 /// Returns the relative error between [this] and [correct]
 double relativeError(vec2 correct) {
   double correct_norm = correct.length;
   double diff_norm = (this - correct).length;
   return diff_norm/correct_norm;
 }
 /// Returns the absolute error between [this] and [correct]
 double absoluteError(vec2 correct) {
   return (this - correct).length;
 }
 set xy(vec2 arg) {
   x = arg.x;
   y = arg.y;
 }
 set yx(vec2 arg) {
   y = arg.x;
   x = arg.y;
 }
 /// Returns true if any component is infinite.
 bool get isInfinite {
   bool is_infinite = false;
   is_infinite = is_infinite || x.isInfinite;
   is_infinite = is_infinite || y.isInfinite;
   return is_infinite;
 }
 /// Returns true if any component is NaN.
 bool get isNaN {
   bool is_nan = false;
   is_nan = is_nan || x.isNaN;
   is_nan = is_nan || y.isNaN;
   return is_nan;
 }
 set r(double arg) =&gt; x = arg;
 set g(double arg) =&gt; y = arg;
 set s(double arg) =&gt; x = arg;
 set t(double arg) =&gt; y = arg;
 set rg(vec2 arg) {
   r = arg.r;
   g = arg.g;
 }
 set gr(vec2 arg) {
   g = arg.r;
   r = arg.g;
 }
 set st(vec2 arg) {
   s = arg.s;
   t = arg.t;
 }
 set ts(vec2 arg) {
   t = arg.s;
   s = arg.t;
 }
 vec2 get xx =&gt; new vec2(x, x);
 vec2 get xy =&gt; new vec2(x, y);
 vec2 get yx =&gt; new vec2(y, x);
 vec2 get yy =&gt; new vec2(y, y);
 vec3 get xxx =&gt; new vec3(x, x, x);
 vec3 get xxy =&gt; new vec3(x, x, y);
 vec3 get xyx =&gt; new vec3(x, y, x);
 vec3 get xyy =&gt; new vec3(x, y, y);
 vec3 get yxx =&gt; new vec3(y, x, x);
 vec3 get yxy =&gt; new vec3(y, x, y);
 vec3 get yyx =&gt; new vec3(y, y, x);
 vec3 get yyy =&gt; new vec3(y, y, y);
 vec4 get xxxx =&gt; new vec4(x, x, x, x);
 vec4 get xxxy =&gt; new vec4(x, x, x, y);
 vec4 get xxyx =&gt; new vec4(x, x, y, x);
 vec4 get xxyy =&gt; new vec4(x, x, y, y);
 vec4 get xyxx =&gt; new vec4(x, y, x, x);
 vec4 get xyxy =&gt; new vec4(x, y, x, y);
 vec4 get xyyx =&gt; new vec4(x, y, y, x);
 vec4 get xyyy =&gt; new vec4(x, y, y, y);
 vec4 get yxxx =&gt; new vec4(y, x, x, x);
 vec4 get yxxy =&gt; new vec4(y, x, x, y);
 vec4 get yxyx =&gt; new vec4(y, x, y, x);
 vec4 get yxyy =&gt; new vec4(y, x, y, y);
 vec4 get yyxx =&gt; new vec4(y, y, x, x);
 vec4 get yyxy =&gt; new vec4(y, y, x, y);
 vec4 get yyyx =&gt; new vec4(y, y, y, x);
 vec4 get yyyy =&gt; new vec4(y, y, y, y);
 double get r =&gt; x;
 double get g =&gt; y;
 double get s =&gt; x;
 double get t =&gt; y;
 vec2 get rr =&gt; new vec2(r, r);
 vec2 get rg =&gt; new vec2(r, g);
 vec2 get gr =&gt; new vec2(g, r);
 vec2 get gg =&gt; new vec2(g, g);
 vec3 get rrr =&gt; new vec3(r, r, r);
 vec3 get rrg =&gt; new vec3(r, r, g);
 vec3 get rgr =&gt; new vec3(r, g, r);
 vec3 get rgg =&gt; new vec3(r, g, g);
 vec3 get grr =&gt; new vec3(g, r, r);
 vec3 get grg =&gt; new vec3(g, r, g);
 vec3 get ggr =&gt; new vec3(g, g, r);
 vec3 get ggg =&gt; new vec3(g, g, g);
 vec4 get rrrr =&gt; new vec4(r, r, r, r);
 vec4 get rrrg =&gt; new vec4(r, r, r, g);
 vec4 get rrgr =&gt; new vec4(r, r, g, r);
 vec4 get rrgg =&gt; new vec4(r, r, g, g);
 vec4 get rgrr =&gt; new vec4(r, g, r, r);
 vec4 get rgrg =&gt; new vec4(r, g, r, g);
 vec4 get rggr =&gt; new vec4(r, g, g, r);
 vec4 get rggg =&gt; new vec4(r, g, g, g);
 vec4 get grrr =&gt; new vec4(g, r, r, r);
 vec4 get grrg =&gt; new vec4(g, r, r, g);
 vec4 get grgr =&gt; new vec4(g, r, g, r);
 vec4 get grgg =&gt; new vec4(g, r, g, g);
 vec4 get ggrr =&gt; new vec4(g, g, r, r);
 vec4 get ggrg =&gt; new vec4(g, g, r, g);
 vec4 get gggr =&gt; new vec4(g, g, g, r);
 vec4 get gggg =&gt; new vec4(g, g, g, g);
 vec2 get ss =&gt; new vec2(s, s);
 vec2 get st =&gt; new vec2(s, t);
 vec2 get ts =&gt; new vec2(t, s);
 vec2 get tt =&gt; new vec2(t, t);
 vec3 get sss =&gt; new vec3(s, s, s);
 vec3 get sst =&gt; new vec3(s, s, t);
 vec3 get sts =&gt; new vec3(s, t, s);
 vec3 get stt =&gt; new vec3(s, t, t);
 vec3 get tss =&gt; new vec3(t, s, s);
 vec3 get tst =&gt; new vec3(t, s, t);
 vec3 get tts =&gt; new vec3(t, t, s);
 vec3 get ttt =&gt; new vec3(t, t, t);
 vec4 get ssss =&gt; new vec4(s, s, s, s);
 vec4 get ssst =&gt; new vec4(s, s, s, t);
 vec4 get ssts =&gt; new vec4(s, s, t, s);
 vec4 get sstt =&gt; new vec4(s, s, t, t);
 vec4 get stss =&gt; new vec4(s, t, s, s);
 vec4 get stst =&gt; new vec4(s, t, s, t);
 vec4 get stts =&gt; new vec4(s, t, t, s);
 vec4 get sttt =&gt; new vec4(s, t, t, t);
 vec4 get tsss =&gt; new vec4(t, s, s, s);
 vec4 get tsst =&gt; new vec4(t, s, s, t);
 vec4 get tsts =&gt; new vec4(t, s, t, s);
 vec4 get tstt =&gt; new vec4(t, s, t, t);
 vec4 get ttss =&gt; new vec4(t, t, s, s);
 vec4 get ttst =&gt; new vec4(t, t, s, t);
 vec4 get ttts =&gt; new vec4(t, t, t, s);
 vec4 get tttt =&gt; new vec4(t, t, t, t);
 vec2 add(vec2 arg) {
   x = x + arg.x;
   y = y + arg.y;
   return this;
 }
 vec2 sub(vec2 arg) {
   x = x - arg.x;
   y = y - arg.y;
   return this;
 }
 vec2 multiply(vec2 arg) {
   x = x * arg.x;
   y = y * arg.y;
   return this;
 }
 vec2 div(vec2 arg) {
   x = x / arg.x;
   y = y / arg.y;
   return this;
 }
 vec2 scale(num arg) {
   double a = arg.toDouble();
   x = x * a;
   y = y * a;
   return this;
 }
 vec2 scaled(num arg) {
   return clone().scale(arg);
 }
 vec2 negate() {
   x = -x;
   y = -y;
   return this;
 }
 vec2 absolute() {
   x = x.abs();
   y = y.abs();
   return this;
 }
 vec2 clone() {
   return new vec2.copy(this);
 }
 vec2 copyInto(vec2 arg) {
   arg.x = x;
   arg.y = y;
   return arg;
 }
 vec2 copyFrom(vec2 arg) {
   x = arg.x;
   y = arg.y;
   return this;
 }
 vec2 set(vec2 arg) {
   x = arg.x;
   y = arg.y;
   return this;
 }
 vec2 setComponents(num x_, num y_) {
   x = x_.toDouble();
   y = y_.toDouble();
   return this;
 }
 /// Copies [this] into [array] starting at [offset].
 void copyIntoArray(List&lt;num&gt; array, [int offset=0]) {
   int i = offset;
   array[i] = x;
   i++;
   array[i] = y;
   i++;
 }
 /// Copies elements from [array] into [this] starting at [offset].
 void copyFromArray(List&lt;num&gt; array, [int offset=0]) {
   int i = offset;
   x = array[i].toDouble();
   i++;
   y = array[i].toDouble();
   i++;
 }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="vec2">
<button class="show-code">Code</button>
new <strong>vec2</strong>([x_, y_]) <a class="anchor-link" href="#vec2"
              title="Permalink to vec2.vec2">#</a></h4>
<div class="doc">
<p>Constructs a new <a class="crossref" href="../vector_math/vec2.html#vec2">vec2</a>. Follows GLSL constructor syntax so many combinations are possible</p>
<pre class="source">
vec2([dynamic x_, dynamic y_]) {
 x = y = 0.0;
 if (x_ is vec2) {
   xy = x_.xy;
   return;
 }
 if (x_ is num &amp;&amp; y_ is num) {
   x = x_.toDouble();
   y = y_.toDouble();
   return;
 }
 if (x_ is num) {
   x = y = x_.toDouble();
   return;
 }
}
</pre>
</div>
</div>
<div class="method"><h4 id="vec2.array">
<button class="show-code">Code</button>
new <strong>vec2.array</strong>(List&lt;num&gt; array, [int offset = 0]) <a class="anchor-link" href="#vec2.array"
              title="Permalink to vec2.vec2.array">#</a></h4>
<div class="doc">
<p>Constructs a new <a class="crossref" href="../vector_math/vec2.html#vec2">vec2</a> that is initialized with values from 
<span class="param">array</span> starting at 
<span class="param">offset</span>.</p>
<pre class="source">
vec2.array(List&lt;num&gt; array, [int offset=0]) {
 int i = offset;
 x = array[i].toDouble();
 i++;
 y = array[i].toDouble();
 i++;
}
</pre>
</div>
</div>
<div class="method"><h4 id="vec2.copy">
<button class="show-code">Code</button>
new <strong>vec2.copy</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#vec2.copy"
              title="Permalink to vec2.vec2.copy">#</a></h4>
<div class="doc">
<p>Constructs a copy of 
<span class="param">other</span>.</p>
<pre class="source">
vec2.copy(vec2 other) {
 makeCopy(other);
}
</pre>
</div>
</div>
<div class="method"><h4 id="vec2.raw">
<button class="show-code">Code</button>
new <strong>vec2.raw</strong>(num x_, num y_) <a class="anchor-link" href="#vec2.raw"
              title="Permalink to vec2.vec2.raw">#</a></h4>
<div class="doc">
<p>Constructs a new <a class="crossref" href="../vector_math/vec2.html#vec2">vec2</a> that is initialized with passed in values.</p>
<pre class="source">
vec2.raw(num x_, num y_) {
 makeRaw(x_, y_);
}
</pre>
</div>
</div>
<div class="method"><h4 id="vec2.zero">
<button class="show-code">Code</button>
new <strong>vec2.zero</strong>() <a class="anchor-link" href="#vec2.zero"
              title="Permalink to vec2.vec2.zero">#</a></h4>
<div class="doc">
<p>Constructs a new <a class="crossref" href="../vector_math/vec2.html#vec2">vec2</a> zero vector.</p>
<pre class="source">
vec2.zero() { makeZero(); }
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field"><h4 id="g">
<button class="show-code">Code</button>
double         <strong>g</strong> <a class="anchor-link"
            href="#g"
            title="Permalink to vec2.g">#</a>
        </h4>
        <div class="doc">
<pre class="source">
double get g =&gt; y;
</pre>
<pre class="source">
set g(double arg) =&gt; y = arg;
</pre>
</div>
</div>
<div class="field"><h4 id="gg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>gg</strong> <a class="anchor-link"
            href="#gg"
            title="Permalink to vec2.gg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get gg =&gt; new vec2(g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="ggg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>ggg</strong> <a class="anchor-link"
            href="#ggg"
            title="Permalink to vec2.ggg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get ggg =&gt; new vec3(g, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="gggg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>gggg</strong> <a class="anchor-link"
            href="#gggg"
            title="Permalink to vec2.gggg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get gggg =&gt; new vec4(g, g, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="gggr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>gggr</strong> <a class="anchor-link"
            href="#gggr"
            title="Permalink to vec2.gggr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get gggr =&gt; new vec4(g, g, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="ggr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>ggr</strong> <a class="anchor-link"
            href="#ggr"
            title="Permalink to vec2.ggr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get ggr =&gt; new vec3(g, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="ggrg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ggrg</strong> <a class="anchor-link"
            href="#ggrg"
            title="Permalink to vec2.ggrg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ggrg =&gt; new vec4(g, g, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="ggrr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ggrr</strong> <a class="anchor-link"
            href="#ggrr"
            title="Permalink to vec2.ggrr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ggrr =&gt; new vec4(g, g, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="gr">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>gr</strong> <a class="anchor-link"
            href="#gr"
            title="Permalink to vec2.gr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get gr =&gt; new vec2(g, r);
</pre>
<pre class="source">
set gr(vec2 arg) {
 g = arg.r;
 r = arg.g;
}
</pre>
</div>
</div>
<div class="field"><h4 id="grg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>grg</strong> <a class="anchor-link"
            href="#grg"
            title="Permalink to vec2.grg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get grg =&gt; new vec3(g, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="grgg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>grgg</strong> <a class="anchor-link"
            href="#grgg"
            title="Permalink to vec2.grgg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get grgg =&gt; new vec4(g, r, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="grgr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>grgr</strong> <a class="anchor-link"
            href="#grgr"
            title="Permalink to vec2.grgr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get grgr =&gt; new vec4(g, r, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="grr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>grr</strong> <a class="anchor-link"
            href="#grr"
            title="Permalink to vec2.grr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get grr =&gt; new vec3(g, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="grrg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>grrg</strong> <a class="anchor-link"
            href="#grrg"
            title="Permalink to vec2.grrg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get grrg =&gt; new vec4(g, r, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="grrr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>grrr</strong> <a class="anchor-link"
            href="#grrr"
            title="Permalink to vec2.grrr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get grrr =&gt; new vec4(g, r, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="isInfinite">
<button class="show-code">Code</button>
final bool         <strong>isInfinite</strong> <a class="anchor-link"
            href="#isInfinite"
            title="Permalink to vec2.isInfinite">#</a>
        </h4>
        <div class="doc">
<p>Returns true if any component is infinite.</p>
<pre class="source">
bool get isInfinite {
 bool is_infinite = false;
 is_infinite = is_infinite || x.isInfinite;
 is_infinite = is_infinite || y.isInfinite;
 return is_infinite;
}
</pre>
</div>
</div>
<div class="field"><h4 id="isNaN">
<button class="show-code">Code</button>
final bool         <strong>isNaN</strong> <a class="anchor-link"
            href="#isNaN"
            title="Permalink to vec2.isNaN">#</a>
        </h4>
        <div class="doc">
<p>Returns true if any component is NaN.</p>
<pre class="source">
bool get isNaN {
 bool is_nan = false;
 is_nan = is_nan || x.isNaN;
 is_nan = is_nan || y.isNaN;
 return is_nan;
}
</pre>
</div>
</div>
<div class="field"><h4 id="length">
<button class="show-code">Code</button>
final double         <strong>length</strong> <a class="anchor-link"
            href="#length"
            title="Permalink to vec2.length">#</a>
        </h4>
        <div class="doc">
<p>Returns length of this</p>
<pre class="source">
double get length {
 double sum = 0.0;
 sum += (x * x);
 sum += (y * y);
 return Math.sqrt(sum);
}
</pre>
</div>
</div>
<div class="field"><h4 id="length2">
<button class="show-code">Code</button>
final double         <strong>length2</strong> <a class="anchor-link"
            href="#length2"
            title="Permalink to vec2.length2">#</a>
        </h4>
        <div class="doc">
<p>Returns squared length of this</p>
<pre class="source">
double get length2 {
 double sum = 0.0;
 sum += (x * x);
 sum += (y * y);
 return sum;
}
</pre>
</div>
</div>
<div class="field"><h4 id="r">
<button class="show-code">Code</button>
double         <strong>r</strong> <a class="anchor-link"
            href="#r"
            title="Permalink to vec2.r">#</a>
        </h4>
        <div class="doc">
<pre class="source">
double get r =&gt; x;
</pre>
<pre class="source">
set r(double arg) =&gt; x = arg;
</pre>
</div>
</div>
<div class="field"><h4 id="rg">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>rg</strong> <a class="anchor-link"
            href="#rg"
            title="Permalink to vec2.rg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get rg =&gt; new vec2(r, g);
</pre>
<pre class="source">
set rg(vec2 arg) {
 r = arg.r;
 g = arg.g;
}
</pre>
</div>
</div>
<div class="field"><h4 id="rgg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>rgg</strong> <a class="anchor-link"
            href="#rgg"
            title="Permalink to vec2.rgg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get rgg =&gt; new vec3(r, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rggg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rggg</strong> <a class="anchor-link"
            href="#rggg"
            title="Permalink to vec2.rggg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rggg =&gt; new vec4(r, g, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rggr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rggr</strong> <a class="anchor-link"
            href="#rggr"
            title="Permalink to vec2.rggr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rggr =&gt; new vec4(r, g, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rgr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>rgr</strong> <a class="anchor-link"
            href="#rgr"
            title="Permalink to vec2.rgr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get rgr =&gt; new vec3(r, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rgrg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rgrg</strong> <a class="anchor-link"
            href="#rgrg"
            title="Permalink to vec2.rgrg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rgrg =&gt; new vec4(r, g, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rgrr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rgrr</strong> <a class="anchor-link"
            href="#rgrr"
            title="Permalink to vec2.rgrr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rgrr =&gt; new vec4(r, g, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>rr</strong> <a class="anchor-link"
            href="#rr"
            title="Permalink to vec2.rr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get rr =&gt; new vec2(r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rrg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>rrg</strong> <a class="anchor-link"
            href="#rrg"
            title="Permalink to vec2.rrg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get rrg =&gt; new vec3(r, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rrgg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rrgg</strong> <a class="anchor-link"
            href="#rrgg"
            title="Permalink to vec2.rrgg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rrgg =&gt; new vec4(r, r, g, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rrgr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rrgr</strong> <a class="anchor-link"
            href="#rrgr"
            title="Permalink to vec2.rrgr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rrgr =&gt; new vec4(r, r, g, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rrr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>rrr</strong> <a class="anchor-link"
            href="#rrr"
            title="Permalink to vec2.rrr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get rrr =&gt; new vec3(r, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="rrrg">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rrrg</strong> <a class="anchor-link"
            href="#rrrg"
            title="Permalink to vec2.rrrg">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rrrg =&gt; new vec4(r, r, r, g);
</pre>
</div>
</div>
<div class="field"><h4 id="rrrr">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>rrrr</strong> <a class="anchor-link"
            href="#rrrr"
            title="Permalink to vec2.rrrr">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get rrrr =&gt; new vec4(r, r, r, r);
</pre>
</div>
</div>
<div class="field"><h4 id="s">
<button class="show-code">Code</button>
double         <strong>s</strong> <a class="anchor-link"
            href="#s"
            title="Permalink to vec2.s">#</a>
        </h4>
        <div class="doc">
<pre class="source">
double get s =&gt; x;
</pre>
<pre class="source">
set s(double arg) =&gt; x = arg;
</pre>
</div>
</div>
<div class="field"><h4 id="ss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>ss</strong> <a class="anchor-link"
            href="#ss"
            title="Permalink to vec2.ss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get ss =&gt; new vec2(s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="sss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>sss</strong> <a class="anchor-link"
            href="#sss"
            title="Permalink to vec2.sss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get sss =&gt; new vec3(s, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="ssss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ssss</strong> <a class="anchor-link"
            href="#ssss"
            title="Permalink to vec2.ssss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ssss =&gt; new vec4(s, s, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="ssst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ssst</strong> <a class="anchor-link"
            href="#ssst"
            title="Permalink to vec2.ssst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ssst =&gt; new vec4(s, s, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="sst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>sst</strong> <a class="anchor-link"
            href="#sst"
            title="Permalink to vec2.sst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get sst =&gt; new vec3(s, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="ssts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ssts</strong> <a class="anchor-link"
            href="#ssts"
            title="Permalink to vec2.ssts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ssts =&gt; new vec4(s, s, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="sstt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>sstt</strong> <a class="anchor-link"
            href="#sstt"
            title="Permalink to vec2.sstt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get sstt =&gt; new vec4(s, s, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="st">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>st</strong> <a class="anchor-link"
            href="#st"
            title="Permalink to vec2.st">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get st =&gt; new vec2(s, t);
</pre>
<pre class="source">
set st(vec2 arg) {
 s = arg.s;
 t = arg.t;
}
</pre>
</div>
</div>
<div class="field"><h4 id="sts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>sts</strong> <a class="anchor-link"
            href="#sts"
            title="Permalink to vec2.sts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get sts =&gt; new vec3(s, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="stss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>stss</strong> <a class="anchor-link"
            href="#stss"
            title="Permalink to vec2.stss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get stss =&gt; new vec4(s, t, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="stst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>stst</strong> <a class="anchor-link"
            href="#stst"
            title="Permalink to vec2.stst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get stst =&gt; new vec4(s, t, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="stt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>stt</strong> <a class="anchor-link"
            href="#stt"
            title="Permalink to vec2.stt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get stt =&gt; new vec3(s, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="stts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>stts</strong> <a class="anchor-link"
            href="#stts"
            title="Permalink to vec2.stts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get stts =&gt; new vec4(s, t, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="sttt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>sttt</strong> <a class="anchor-link"
            href="#sttt"
            title="Permalink to vec2.sttt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get sttt =&gt; new vec4(s, t, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="t">
<button class="show-code">Code</button>
double         <strong>t</strong> <a class="anchor-link"
            href="#t"
            title="Permalink to vec2.t">#</a>
        </h4>
        <div class="doc">
<pre class="source">
double get t =&gt; y;
</pre>
<pre class="source">
set t(double arg) =&gt; y = arg;
</pre>
</div>
</div>
<div class="field"><h4 id="ts">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>ts</strong> <a class="anchor-link"
            href="#ts"
            title="Permalink to vec2.ts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get ts =&gt; new vec2(t, s);
</pre>
<pre class="source">
set ts(vec2 arg) {
 t = arg.s;
 s = arg.t;
}
</pre>
</div>
</div>
<div class="field"><h4 id="tss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>tss</strong> <a class="anchor-link"
            href="#tss"
            title="Permalink to vec2.tss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get tss =&gt; new vec3(t, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="tsss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>tsss</strong> <a class="anchor-link"
            href="#tsss"
            title="Permalink to vec2.tsss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get tsss =&gt; new vec4(t, s, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="tsst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>tsst</strong> <a class="anchor-link"
            href="#tsst"
            title="Permalink to vec2.tsst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get tsst =&gt; new vec4(t, s, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="tst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>tst</strong> <a class="anchor-link"
            href="#tst"
            title="Permalink to vec2.tst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get tst =&gt; new vec3(t, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="tsts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>tsts</strong> <a class="anchor-link"
            href="#tsts"
            title="Permalink to vec2.tsts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get tsts =&gt; new vec4(t, s, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="tstt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>tstt</strong> <a class="anchor-link"
            href="#tstt"
            title="Permalink to vec2.tstt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get tstt =&gt; new vec4(t, s, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="tt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>tt</strong> <a class="anchor-link"
            href="#tt"
            title="Permalink to vec2.tt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get tt =&gt; new vec2(t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="tts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>tts</strong> <a class="anchor-link"
            href="#tts"
            title="Permalink to vec2.tts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get tts =&gt; new vec3(t, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="ttss">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ttss</strong> <a class="anchor-link"
            href="#ttss"
            title="Permalink to vec2.ttss">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ttss =&gt; new vec4(t, t, s, s);
</pre>
</div>
</div>
<div class="field"><h4 id="ttst">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ttst</strong> <a class="anchor-link"
            href="#ttst"
            title="Permalink to vec2.ttst">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ttst =&gt; new vec4(t, t, s, t);
</pre>
</div>
</div>
<div class="field"><h4 id="ttt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>ttt</strong> <a class="anchor-link"
            href="#ttt"
            title="Permalink to vec2.ttt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get ttt =&gt; new vec3(t, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="ttts">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>ttts</strong> <a class="anchor-link"
            href="#ttts"
            title="Permalink to vec2.ttts">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get ttts =&gt; new vec4(t, t, t, s);
</pre>
</div>
</div>
<div class="field"><h4 id="tttt">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>tttt</strong> <a class="anchor-link"
            href="#tttt"
            title="Permalink to vec2.tttt">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get tttt =&gt; new vec4(t, t, t, t);
</pre>
</div>
</div>
<div class="field"><h4 id="x">
<button class="show-code">Code</button>
double         <strong>x</strong> <a class="anchor-link"
            href="#x"
            title="Permalink to vec2.x">#</a>
        </h4>
        <div class="doc">
<pre class="source">
x
</pre>
</div>
</div>
<div class="field"><h4 id="xx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>xx</strong> <a class="anchor-link"
            href="#xx"
            title="Permalink to vec2.xx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get xx =&gt; new vec2(x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>xxx</strong> <a class="anchor-link"
            href="#xxx"
            title="Permalink to vec2.xxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get xxx =&gt; new vec3(x, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xxxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xxxx</strong> <a class="anchor-link"
            href="#xxxx"
            title="Permalink to vec2.xxxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xxxx =&gt; new vec4(x, x, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xxxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xxxy</strong> <a class="anchor-link"
            href="#xxxy"
            title="Permalink to vec2.xxxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xxxy =&gt; new vec4(x, x, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="xxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>xxy</strong> <a class="anchor-link"
            href="#xxy"
            title="Permalink to vec2.xxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get xxy =&gt; new vec3(x, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="xxyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xxyx</strong> <a class="anchor-link"
            href="#xxyx"
            title="Permalink to vec2.xxyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xxyx =&gt; new vec4(x, x, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xxyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xxyy</strong> <a class="anchor-link"
            href="#xxyy"
            title="Permalink to vec2.xxyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xxyy =&gt; new vec4(x, x, y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="xy">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>xy</strong> <a class="anchor-link"
            href="#xy"
            title="Permalink to vec2.xy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get xy =&gt; new vec2(x, y);
</pre>
<pre class="source">
set xy(vec2 arg) {
 x = arg.x;
 y = arg.y;
}
</pre>
</div>
</div>
<div class="field"><h4 id="xyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>xyx</strong> <a class="anchor-link"
            href="#xyx"
            title="Permalink to vec2.xyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get xyx =&gt; new vec3(x, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xyxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xyxx</strong> <a class="anchor-link"
            href="#xyxx"
            title="Permalink to vec2.xyxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xyxx =&gt; new vec4(x, y, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xyxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xyxy</strong> <a class="anchor-link"
            href="#xyxy"
            title="Permalink to vec2.xyxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xyxy =&gt; new vec4(x, y, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="xyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>xyy</strong> <a class="anchor-link"
            href="#xyy"
            title="Permalink to vec2.xyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get xyy =&gt; new vec3(x, y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="xyyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xyyx</strong> <a class="anchor-link"
            href="#xyyx"
            title="Permalink to vec2.xyyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xyyx =&gt; new vec4(x, y, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="xyyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>xyyy</strong> <a class="anchor-link"
            href="#xyyy"
            title="Permalink to vec2.xyyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get xyyy =&gt; new vec4(x, y, y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="y">
<button class="show-code">Code</button>
double         <strong>y</strong> <a class="anchor-link"
            href="#y"
            title="Permalink to vec2.y">#</a>
        </h4>
        <div class="doc">
<pre class="source">
y
</pre>
</div>
</div>
<div class="field"><h4 id="yx">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a>         <strong>yx</strong> <a class="anchor-link"
            href="#yx"
            title="Permalink to vec2.yx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get yx =&gt; new vec2(y, x);
</pre>
<pre class="source">
set yx(vec2 arg) {
 y = arg.x;
 x = arg.y;
}
</pre>
</div>
</div>
<div class="field"><h4 id="yxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>yxx</strong> <a class="anchor-link"
            href="#yxx"
            title="Permalink to vec2.yxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get yxx =&gt; new vec3(y, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yxxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yxxx</strong> <a class="anchor-link"
            href="#yxxx"
            title="Permalink to vec2.yxxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yxxx =&gt; new vec4(y, x, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yxxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yxxy</strong> <a class="anchor-link"
            href="#yxxy"
            title="Permalink to vec2.yxxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yxxy =&gt; new vec4(y, x, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>yxy</strong> <a class="anchor-link"
            href="#yxy"
            title="Permalink to vec2.yxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get yxy =&gt; new vec3(y, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yxyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yxyx</strong> <a class="anchor-link"
            href="#yxyx"
            title="Permalink to vec2.yxyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yxyx =&gt; new vec4(y, x, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yxyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yxyy</strong> <a class="anchor-link"
            href="#yxyy"
            title="Permalink to vec2.yxyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yxyy =&gt; new vec4(y, x, y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>yy</strong> <a class="anchor-link"
            href="#yy"
            title="Permalink to vec2.yy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec2 get yy =&gt; new vec2(y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>yyx</strong> <a class="anchor-link"
            href="#yyx"
            title="Permalink to vec2.yyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get yyx =&gt; new vec3(y, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yyxx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yyxx</strong> <a class="anchor-link"
            href="#yyxx"
            title="Permalink to vec2.yyxx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yyxx =&gt; new vec4(y, y, x, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yyxy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yyxy</strong> <a class="anchor-link"
            href="#yyxy"
            title="Permalink to vec2.yyxy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yyxy =&gt; new vec4(y, y, x, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec3.html">vec3</a>         <strong>yyy</strong> <a class="anchor-link"
            href="#yyy"
            title="Permalink to vec2.yyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec3 get yyy =&gt; new vec3(y, y, y);
</pre>
</div>
</div>
<div class="field"><h4 id="yyyx">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yyyx</strong> <a class="anchor-link"
            href="#yyyx"
            title="Permalink to vec2.yyyx">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yyyx =&gt; new vec4(y, y, y, x);
</pre>
</div>
</div>
<div class="field"><h4 id="yyyy">
<button class="show-code">Code</button>
final <a href="../vector_math/vec4.html">vec4</a>         <strong>yyyy</strong> <a class="anchor-link"
            href="#yyyy"
            title="Permalink to vec2.yyyy">#</a>
        </h4>
        <div class="doc">
<pre class="source">
vec4 get yyyy =&gt; new vec4(y, y, y, y);
</pre>
</div>
</div>
</div>
<div>
<h3>Operators</h3>
<div class="method"><h4 id="[]">
<button class="show-code">Code</button>
double <strong>operator []</strong>(int i) <a class="anchor-link" href="#[]"
              title="Permalink to vec2.operator []">#</a></h4>
<div class="doc">
<p>Returns a component from vec2. This is indexed as an array with 
<span class="param">i</span></p>
<pre class="source">
double operator[](int i) {
 assert(i &gt;= 0 &amp;&amp; i &lt; 2);
 switch (i) {
   case 0: return x;
   case 1: return y;
 };
 return 0.0;
}
</pre>
</div>
</div>
<div class="method"><h4 id="[]=">
<button class="show-code">Code</button>
void <strong>operator []=</strong>(int i, double v) <a class="anchor-link" href="#[]="
              title="Permalink to vec2.operator []=">#</a></h4>
<div class="doc">
<p>Assigns a component in vec2 the value in 
<span class="param">v</span>. This is indexed as an array with 
<span class="param">i</span></p>
<pre class="source">
void operator[]=(int i, double v) {
 assert(i &gt;= 0 &amp;&amp; i &lt; 2);
 switch (i) {
   case 0: x = v; break;
   case 1: y = v; break;
 };
}
</pre>
</div>
</div>
<div class="method"><h4 id="+">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>operator +</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#+"
              title="Permalink to vec2.operator +">#</a></h4>
<div class="doc">
<p>Returns a new vec2 from this + 
<span class="param">other</span></p>
<pre class="source">
vec2 operator+(vec2 other) =&gt; new vec2.raw(x + other.x, y + other.y);
</pre>
</div>
</div>
<div class="method"><h4 id="unary-">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>operator -</strong>() <a class="anchor-link" href="#unary-"
              title="Permalink to vec2.operator -">#</a></h4>
<div class="doc">
<p>Returns a new vec2 from -this</p>
<pre class="source">
vec2 operator-() =&gt; new vec2.raw(-x, -y);
</pre>
</div>
</div>
<div class="method"><h4 id="-">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>operator -</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#-"
              title="Permalink to vec2.operator -">#</a></h4>
<div class="doc">
<p>Returns a new vec2 from this - 
<span class="param">other</span></p>
<pre class="source">
vec2 operator-(vec2 other) =&gt; new vec2.raw(x - other.x, y - other.y);
</pre>
</div>
</div>
<div class="method"><h4 id="*">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>operator *</strong>(other) <a class="anchor-link" href="#*"
              title="Permalink to vec2.operator *">#</a></h4>
<div class="doc">
<p>Returns a new vec2 scaled by 
<span class="param">other</span></p>
<pre class="source">
vec2 operator*(dynamic other) {
 if (other is num) {
   var o = other.toDouble();
   return new vec2.raw(x * o, y * o);
 }
 if (other is vec2) {
   return new vec2.raw(x * other.x, y * other.y);
 }
}
</pre>
</div>
</div>
<div class="method"><h4 id="/">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>operator /</strong>(other) <a class="anchor-link" href="#/"
              title="Permalink to vec2.operator /">#</a></h4>
<div class="doc">
<p>Returns a new vec2 divided by 
<span class="param">other</span></p>
<pre class="source">
vec2 operator/(dynamic other) {
 if (other is num) {
   var o = 1.0 / other.toDouble();
   return new vec2.raw(x * o, y * o);
 }
 if (other is vec2) {
   return new vec2.raw(x / other.x, y / other.y);
 }
}
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="absolute">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>absolute</strong>() <a class="anchor-link" href="#absolute"
              title="Permalink to vec2.absolute">#</a></h4>
<div class="doc">
<pre class="source">
vec2 absolute() {
 x = x.abs();
 y = y.abs();
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="absoluteError">
<button class="show-code">Code</button>
double <strong>absoluteError</strong>(<a href="../vector_math/vec2.html">vec2</a> correct) <a class="anchor-link" href="#absoluteError"
              title="Permalink to vec2.absoluteError">#</a></h4>
<div class="doc">
<p>Returns the absolute error between <code>this</code> and 
<span class="param">correct</span></p>
<pre class="source">
double absoluteError(vec2 correct) {
 return (this - correct).length;
}
</pre>
</div>
</div>
<div class="method"><h4 id="add">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>add</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#add"
              title="Permalink to vec2.add">#</a></h4>
<div class="doc">
<pre class="source">
vec2 add(vec2 arg) {
 x = x + arg.x;
 y = y + arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="clone">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>clone</strong>() <a class="anchor-link" href="#clone"
              title="Permalink to vec2.clone">#</a></h4>
<div class="doc">
<pre class="source">
vec2 clone() {
 return new vec2.copy(this);
}
</pre>
</div>
</div>
<div class="method"><h4 id="copyFrom">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>copyFrom</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#copyFrom"
              title="Permalink to vec2.copyFrom">#</a></h4>
<div class="doc">
<pre class="source">
vec2 copyFrom(vec2 arg) {
 x = arg.x;
 y = arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="copyFromArray">
<button class="show-code">Code</button>
void <strong>copyFromArray</strong>(List&lt;num&gt; array, [int offset = 0]) <a class="anchor-link" href="#copyFromArray"
              title="Permalink to vec2.copyFromArray">#</a></h4>
<div class="doc">
<p>Copies elements from 
<span class="param">array</span> into <code>this</code> starting at 
<span class="param">offset</span>.</p>
<pre class="source">
void copyFromArray(List&lt;num&gt; array, [int offset=0]) {
 int i = offset;
 x = array[i].toDouble();
 i++;
 y = array[i].toDouble();
 i++;
}
</pre>
</div>
</div>
<div class="method"><h4 id="copyInto">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>copyInto</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#copyInto"
              title="Permalink to vec2.copyInto">#</a></h4>
<div class="doc">
<pre class="source">
vec2 copyInto(vec2 arg) {
 arg.x = x;
 arg.y = y;
 return arg;
}
</pre>
</div>
</div>
<div class="method"><h4 id="copyIntoArray">
<button class="show-code">Code</button>
void <strong>copyIntoArray</strong>(List&lt;num&gt; array, [int offset = 0]) <a class="anchor-link" href="#copyIntoArray"
              title="Permalink to vec2.copyIntoArray">#</a></h4>
<div class="doc">
<p>Copies <code>this</code> into 
<span class="param">array</span> starting at 
<span class="param">offset</span>.</p>
<pre class="source">
void copyIntoArray(List&lt;num&gt; array, [int offset=0]) {
 int i = offset;
 array[i] = x;
 i++;
 array[i] = y;
 i++;
}
</pre>
</div>
</div>
<div class="method"><h4 id="cross">
<button class="show-code">Code</button>
double <strong>cross</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#cross"
              title="Permalink to vec2.cross">#</a></h4>
<div class="doc">
<p>Returns the cross product of <code>this</code> and 
<span class="param">other</span>, optionally pass in output storage <code>out</code></p>
<pre class="source">
double cross(vec2 other) {
 return x * other.y - y * other.x;
}
</pre>
</div>
</div>
<div class="method"><h4 id="div">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>div</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#div"
              title="Permalink to vec2.div">#</a></h4>
<div class="doc">
<pre class="source">
vec2 div(vec2 arg) {
 x = x / arg.x;
 y = y / arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="dot">
<button class="show-code">Code</button>
double <strong>dot</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#dot"
              title="Permalink to vec2.dot">#</a></h4>
<div class="doc">
<p>Returns the dot product of <code>this</code> and 
<span class="param">other</span></p>
<pre class="source">
double dot(vec2 other) {
 double sum = 0.0;
 sum += (x * other.x);
 sum += (y * other.y);
 return sum;
}
</pre>
</div>
</div>
<div class="method"><h4 id="makeCopy">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>makeCopy</strong>(<a href="../vector_math/vec2.html">vec2</a> other) <a class="anchor-link" href="#makeCopy"
              title="Permalink to vec2.makeCopy">#</a></h4>
<div class="doc">
<p>Make <code>this</code> a copy of [other] [other].</p>
<pre class="source">
vec2 makeCopy(vec2 other) {
 x = other.x;
 y = other.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="makeRaw">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>makeRaw</strong>(num x_, num y_) <a class="anchor-link" href="#makeRaw"
              title="Permalink to vec2.makeRaw">#</a></h4>
<div class="doc">
<p>Components of <code>this</code> are set to the passed in values.</p>
<pre class="source">
vec2 makeRaw(num x_, num y_) {
 x = x_.toDouble();
 y = y_.toDouble();
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="makeZero">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>makeZero</strong>() <a class="anchor-link" href="#makeZero"
              title="Permalink to vec2.makeZero">#</a></h4>
<div class="doc">
<p>Make <code>this</code> the zero vector.</p>
<pre class="source">
vec2 makeZero() {
 x = 0.0;
 y = 0.0;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="multiply">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>multiply</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#multiply"
              title="Permalink to vec2.multiply">#</a></h4>
<div class="doc">
<pre class="source">
vec2 multiply(vec2 arg) {
 x = x * arg.x;
 y = y * arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="negate">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>negate</strong>() <a class="anchor-link" href="#negate"
              title="Permalink to vec2.negate">#</a></h4>
<div class="doc">
<pre class="source">
vec2 negate() {
 x = -x;
 y = -y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="normalize">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>normalize</strong>() <a class="anchor-link" href="#normalize"
              title="Permalink to vec2.normalize">#</a></h4>
<div class="doc">
<p>Normalizes <code>this</code>. Returns <code>this</code>.</p>
<pre class="source">
vec2 normalize() {
 double l = length;
 if (l == 0.0) {
   return this;
 }
 x /= l;
 y /= l;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="normalized">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>normalized</strong>([<a href="../vector_math/vec2.html">vec2</a> out = null]) <a class="anchor-link" href="#normalized"
              title="Permalink to vec2.normalized">#</a></h4>
<div class="doc">
<p>Normalizes <code>this</code> returns new vector or optional 
<span class="param">out</span></p>
<pre class="source">
vec2 normalized([vec2 out = null]) {
 if (out == null) {
   out = new vec2.raw(x, y);
 }
 double l = out.length;
 if (l == 0.0) {
   return out;
 }
 out.x /= l;
 out.y /= l;
 return out;
}
</pre>
</div>
</div>
<div class="method"><h4 id="normalizeLength">
<button class="show-code">Code</button>
double <strong>normalizeLength</strong>() <a class="anchor-link" href="#normalizeLength"
              title="Permalink to vec2.normalizeLength">#</a></h4>
<div class="doc">
<p>Normalizes <code>this</code>. Returns length.</p>
<pre class="source">
double normalizeLength() {
 double l = length;
 if (l == 0.0) {
   return 0.0;
 }
 x /= l;
 y /= l;
 return l;
}
</pre>
</div>
</div>
<div class="method"><h4 id="relativeError">
<button class="show-code">Code</button>
double <strong>relativeError</strong>(<a href="../vector_math/vec2.html">vec2</a> correct) <a class="anchor-link" href="#relativeError"
              title="Permalink to vec2.relativeError">#</a></h4>
<div class="doc">
<p>Returns the relative error between <code>this</code> and 
<span class="param">correct</span></p>
<pre class="source">
double relativeError(vec2 correct) {
 double correct_norm = correct.length;
 double diff_norm = (this - correct).length;
 return diff_norm/correct_norm;
}
</pre>
</div>
</div>
<div class="method"><h4 id="scale">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>scale</strong>(num arg) <a class="anchor-link" href="#scale"
              title="Permalink to vec2.scale">#</a></h4>
<div class="doc">
<pre class="source">
vec2 scale(num arg) {
 double a = arg.toDouble();
 x = x * a;
 y = y * a;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="scaled">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>scaled</strong>(num arg) <a class="anchor-link" href="#scaled"
              title="Permalink to vec2.scaled">#</a></h4>
<div class="doc">
<pre class="source">
vec2 scaled(num arg) {
 return clone().scale(arg);
}
</pre>
</div>
</div>
<div class="method"><h4 id="set">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>set</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#set"
              title="Permalink to vec2.set">#</a></h4>
<div class="doc">
<pre class="source">
vec2 set(vec2 arg) {
 x = arg.x;
 y = arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="setComponents">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>setComponents</strong>(num x_, num y_) <a class="anchor-link" href="#setComponents"
              title="Permalink to vec2.setComponents">#</a></h4>
<div class="doc">
<pre class="source">
vec2 setComponents(num x_, num y_) {
 x = x_.toDouble();
 y = y_.toDouble();
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="splat">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>splat</strong>(num arg) <a class="anchor-link" href="#splat"
              title="Permalink to vec2.splat">#</a></h4>
<div class="doc">
<p>Splats a scalar into all lanes of the vector.</p>
<pre class="source">
vec2 splat(num arg) {
 double a = arg.toDouble();
 x = a;
 y = a;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="sub">
<button class="show-code">Code</button>
<a href="../vector_math/vec2.html">vec2</a> <strong>sub</strong>(<a href="../vector_math/vec2.html">vec2</a> arg) <a class="anchor-link" href="#sub"
              title="Permalink to vec2.sub">#</a></h4>
<div class="doc">
<pre class="source">
vec2 sub(vec2 arg) {
 x = x - arg.x;
 y = y - arg.y;
 return this;
}
</pre>
</div>
</div>
<div class="method"><h4 id="toString">
<button class="show-code">Code</button>
String <strong>toString</strong>() <a class="anchor-link" href="#toString"
              title="Permalink to vec2.toString">#</a></h4>
<div class="doc">
<p>Returns a printable string</p>
<pre class="source">
String toString() =&gt; '$x,$y';
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
